package generics.cl;

import java.util.LinkedList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 10.05.11
 * Time: 16:50
 * To change this template use File | Settings | File Templates.
 */
public class NonChild {

	private List<String> s_list = new LinkedList<String>();
	private List<Integer> i_list = new LinkedList<Integer>();
	private List<Object> o_list = new LinkedList<Object>();

	public void addAll(List<String> list) {
		s_list.addAll(list);
	}

	public void init() {
		List<String> s_list_inner = new LinkedList<String>();
		List<Integer> i_list_inner = new LinkedList<Integer>();
		List<Object> o_list_inner = new LinkedList<Object>();

		s_list_inner.add("1");
		s_list_inner.add("2");
		s_list_inner.add("3");

		i_list_inner.add(1);
		i_list_inner.add(2);
		i_list_inner.add(3);

		o_list_inner.add(4);
		o_list_inner.add("2");
		o_list_inner.add(null);


		addAll(s_list_inner);
//		addAll(i_list);
//		addAll(o_list);

		List tmp_list = s_list_inner;

		addAll(tmp_list);

		tmp_list = i_list;

		addAll(tmp_list);


		tmp_list = i_list_inner;

		addAll(tmp_list);
	}

	public void printContent() {
		for(String s: s_list)
			System.out.println(s);
	}

	public static void main(String ... args) {
		NonChild ch = new NonChild();

		ch.init();
		ch.printContent();


	}
}
